import { getWin } from "./initWin";

let isDevToolsOpened = false;
export const closeDevTools = () => {
    isDevToolsOpened = false;
}

const switchDevTools = () => {
    const win = getWin();
    if (isDevToolsOpened) {
        win.webContents.closeDevTools()
    } else {
        win.webContents.openDevTools();
        isDevToolsOpened = true;
    }
}

export default switchDevTools;